<template>
  <div id="app">
    <keep-alive>
        <router-view v-if="$route.meta.keep" />
    </keep-alive>
     <router-view v-if="!$route.meta.keep" />

    <van-tabbar
    route v-model="active" v-if="$route.meta.isRoot">
      <van-tabbar-item replace to="/">
        <span>首页</span>
        <template #icon="props">
          <van-icon name="home-o" />
        </template>
      </van-tabbar-item>

      <van-tabbar-item replace to="/publish">
        <span>发布</span>
        <template #icon="props">
          <van-icon name="add-o" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/my1">
        <span>我的</span>
        <template #icon="props">
          <van-icon name="manager-o" />
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  created() {
   
  },
};
</script>
<style lang="scss" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // background-color: #ccc;
  color: #2c3e50;

}


nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

    .xl-icon {
       width: 1em; height: 1em;
       vertical-align: -0.15em;
       fill: currentColor;
       overflow: hidden;
    }
  
</style>
